#ifndef FILENODE_H
#define FILENODE_H
/*---------------------------------------------------------------------------*/
#include <string>
#include <iostream>
#include <vector>
/*---------------------------------------------------------------------------*/
using namespace std;
typedef unsigned long int uli;
typedef unsigned int uint;
/*---------------------------------------------------------------------------*/
class FileNode
{
	private:
	
	FileNode			*parent;
	string 				strName;
	uli    				size;
	int					type;
	
	vector<FileNode*>	childs;
	unsigned int		currentChild;
	
	bool				bDone;

		
	public:
	
	FileNode(string name, FileNode *p = NULL);


	~FileNode();
	
	string				getName();
	string				getAbsolutePath();
	string				getExtension();
	
	void				setSize(uli s);
	uli					getSize();
	
	void				setType(int s);
	int					getType();
		
	FileNode			*getParent();
	FileNode			*getChild(string name);
	
	
	FileNode			*getFirstChild();
	FileNode			*getNextChild();
	
	bool				hasChilds();
	bool				isFolder();
	
	void 				addChild(FileNode *ch);
	
	void				clear();
	
	double				getChildsSize();
	uint				getChildsCount();
	
	FileNode			*add(string str);
	
	void				show(int level=0);
	
	unsigned int		getNodesCount();
	
	void				setDone(bool d);
	bool				isDone();
	bool				isFilled();
	
	void				setNoVerify( string fullpath );
	
};
/*---------------------------------------------------------------------------*/
#endif
